#include <string.h>

size_t find(const char* str, const char chr)
{
    for (size_t i = 0; i < strlen(str); i++)
        if (str[i] == chr)
            return i;

    return -1;
}

size_t rfind(const char* str, const char ch)
{
    for (size_t i = strlen(str); i != 0; i--)
        if (str[i] == ch)
            return i;

    return -1;
}
